package com.company.cloud.user.modules.api.service;

import com.company.cloud.common.bean.BaseClientResult;
import com.company.cloud.user.modules.api.fallback.PermissionPlatformRemoteServiceFallbackFactory;
import com.company.cloud.user.modules.api.request.*;
import com.company.cloud.user.modules.api.response.*;
import com.company.common.server.constant.ServiceNameConstant;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

@FeignClient(contextId = "permissionPT", name = ServiceNameConstant.user_center, fallbackFactory = PermissionPlatformRemoteServiceFallbackFactory.class)
public interface PermissionPlatformRemoteService {


    /**权限菜单查询Tree*/
    @RequestMapping(value = "/remote/pt/permission/query" ,method = RequestMethod.POST)
    public BaseClientResult<PermissionQueryResp> queryPermission(@RequestBody PermissionQueryRequest request);

    /**新增权限菜单*/
    @RequestMapping(value = "/remote/pt/permission/addRole", method = RequestMethod.POST)
    public BaseClientResult<PermissionModel> addPermission(@RequestBody PermissionAddRequest request);

    /**修改权限菜单*/
    @RequestMapping(value = "/remote/pt/permission/updateRole", method = RequestMethod.POST)
    public BaseClientResult<PermissionModel> updatePermission(@RequestBody PermissionUpdateRequest request);

    /**获取权限菜单*/
    @RequestMapping(value = "/remote/pt/permission/infoRole", method = RequestMethod.POST)
    public BaseClientResult<PermissionModel> infoPermission(@RequestBody PermissionGet2DelRequest request );

    /**删除权限菜单*/
    @RequestMapping(value = "/remote/pt/permission/delRole", method = RequestMethod.POST)
    public BaseClientResult<String> delPermission(@RequestBody PermissionGet2DelRequest request );

}
